<!DOCTYPE html>
<html>
<head>
    <title>Increment/Decrement Example 2</title>
    <script type="text/javascript">
          
        var num1 = 2;
        var num2 = 20;
        var num3 = --num1 + num2;    //equals 21
        var num4 = num1 + num2;      //equals 21

        alert(num3);
        alert(num4);
    </script>

</head>
<body>
  
</body>
</html>